from fastapi import FastAPI
from src.user import userRouter

app = FastAPI()
app.include_router(userRouter, prefix='/user')


@app.get("/")
async def root():
    return {"message": "Hello World"}


if __name__ == "__main__":
    print('http://127.0.0.1:8080')
    import os

    fileInfo = os.path.basename(__file__).split('.')
    filename = fileInfo[0]
    print(app)
    import uvicorn

    uvicorn.run(filename + ":app", host="0.0.0.0", port=8080, reload=True)
